package com.kouxin.appaccount.trade;

import java.io.Serializable;
import java.util.List;

import org.springframework.orm.hibernate3.support.HibernateDaoSupport;

public class TradeDao extends HibernateDaoSupport {

	public void insert(Trade trade) {
		this.getHibernateTemplate().save(trade);
	}
	
	@SuppressWarnings("unchecked")
	public List<Trade> findByExample(Trade trade) {
		return (List<Trade>)this.getHibernateTemplate().findByExample(trade);
	}
	
	public Trade get(Serializable id) {
		return (Trade) this.getHibernateTemplate().get(Trade.class, id);
	}
}
